from flask import Flask, render_template_string

app = Flask(__name__)

@app.errorhandler(404)
def page_not_found(e):
    return render_template_string('<h1>404 - Page Not Found</h1>'), 404

@app.errorhandler(500)
def internal_server_error(e):
    return render_template_string('<h1>500 - Internal Server Error</h1>'), 500

@app.route('/')
def home():
    return 'Hello, Flask Error Handling!'

if __name__ == '__main__':
    app.run(debug=True)